#ifndef __ARRAY_HH__
#define __ARRAY_HH__

template <typename T, int N>
struct array
{
  T data[N];
  void zeroit() { memset(data, '\0', sizeof data); }
  void fill(const T& t) { for (int i = 0; i < N; ++i) data[i] = t; }
  void print(ostream& out) const {
    for (int i = 0; i < N; ++i) out << data[i] << ",";
  }
};

template<typename T, int N>
inline
ostream& operator<<(ostream& out, const array<T, N>& a)
{
  a.print(out);
  return out;
}

#endif
